package com.yh.create.build_pattern.demo2;

/**
 * @program: design-patterns
 * @description: ${description}
 * @author: yangh0597@163.com
 * @date: 2021-03-13 12:48
 * @problem:
 **/
class LdapVo {
    private String file1;
    private String file2;
    private String file3;
    private String file4;
    private String file5;

    public LdapVo(LdapVoBuild ldapVoBuild) {
        this.file1=ldapVoBuild.file1;
        this.file2=ldapVoBuild.file2;
        this.file3=ldapVoBuild.file3;
        this.file4=ldapVoBuild.file4;
        this.file5=ldapVoBuild.file5;
    }


    public static class LdapVoBuild {
        private String file1;
        private String file2;
        private String file3;
        private String file4;
        private String file5;

        public LdapVoBuild() {
        }

        public LdapVoBuild file1(String file1) {
            this.file1 = file1;
            return this;
        }

        public LdapVoBuild file2(String file2) {
            this.file2 = file2;
            return this;
        }

        public LdapVoBuild file3(String file3) {
            this.file3 = file3;
            return this;
        }

        public LdapVoBuild file4(String file4) {
            this.file4 = file4;
            return this;
        }

        public LdapVoBuild file5(String file4) {
            this.file4 = file4;
            return this;
        }


        public LdapVo getLdapVO(){
            return new LdapVo(this);
        }
    }

    public static void main(String[] args) {
        LdapVo ldapVO = new LdapVoBuild().file1("a").file2("c").file3("4").getLdapVO();
    }
}
